using System;
using System.Xml.Serialization;

namespace com.exceptionalsoftware.spacetime.KML
{
	[Serializable()]
    [XmlType(TypeName = "NetworkLinkControlType")]
    public class NetworkLinkControl
	{
        private Snippet linkSnippetField;
        private string messageField, linkNameField, linkDescriptionField;
        private double maxSessionLengthField;
        private double minRefreshPeriodField;
        private string cookieField;
        private string expiresField;
        private Camera cameraField;
        private LookAtType lookAtField;
        //private LookAtType viewField;
        private Update updateField;

        public NetworkLinkControl()
        {
            this.minRefreshPeriodField = 0;
            this.maxSessionLengthField = -1;
        }


        [XmlElement(ElementName = "message", DataType = "string")]
        public string Message
        {
            get { return this.messageField; }
            set { this.messageField = value; }
        }

        [XmlElement(ElementName = "expires", DataType = "string")]
        public string Expires
        {
            get { return this.expiresField; }
            set { this.expiresField = value; }
        }

        [XmlElement(ElementName = "cookie", DataType = "string")]
        public string Cookie
        {
            get { return this.cookieField; }
            set { this.cookieField = value; }
        }
        
        [XmlElement(ElementName = "maxSessionLength", DataType = "double")]
        public double MaxSessionLengthField
        {
            get { return this.maxSessionLengthField; }
            set { this.maxSessionLengthField = value; }
        }

        [XmlElement(ElementName = "minRefreshPeriod", DataType = "double")]
        public double MinRefreshPeriod
        {
            get { return this.minRefreshPeriodField; }
            set { this.minRefreshPeriodField = value; }
        }

        [XmlElement(ElementName = "linkName", DataType = "string")]
        public string LinkName
        {
            get { return this.linkNameField; }
            set { this.linkNameField = value; }
        }

        [XmlElement(ElementName = "linkDescription", DataType = "string")]
        public string LinkDescription
        {
            get { return this.linkDescriptionField; }
            set { this.linkDescriptionField = value; }
        }

        [XmlElement(ElementName = "linkSnippet", Type = typeof(Snippet))]
        public Snippet LinkSnippet
        {
            get { return this.linkSnippetField; }
            set { this.linkSnippetField = value; }
        }

        [XmlElement(ElementName = "LookAt", Type = typeof(LookAtType))]
        public LookAtType LookAt
        {
            get { return this.lookAtField; }
            set { this.lookAtField = value; }
        }

        [XmlElement(ElementName = "View", Type = typeof(LookAtType))]
        public LookAtType View
        {
            get { return this.lookAtField; }
            set { this.lookAtField = value; }
        }

        [XmlElement(ElementName = "Camera", Type = typeof(Camera))]
        public Camera Camera
        {
            get { return this.cameraField; }
            set { this.cameraField = value; }
        }

        [XmlElement(ElementName = "Update", Type = typeof(Update))]
        public Update Update
        {
            get { return this.updateField; }
            set { this.updateField = value; }
        }
    }
}